﻿using System.Web;
using SlamCms.Web;
using SlamCms.Services;

namespace SlamCms.Common
{
	public static class HttpContextBaseExtensions
	{
		public static ICookieManager GetCookieManager(this HttpContextBase httpContextBase)
		{
			var cookieManager = SlamCmsConfiguration.Instance.DependencyResolver.GetService<ICookieManager>();
			if (cookieManager == null)
				cookieManager = new CookieManager(httpContextBase);
			return cookieManager;
		}
	}
}
